﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using MapTest.Models;

namespace MapTest
{
    /// <summary>
    /// Summary description for TheHandler
    /// </summary>
    public class TheHandler : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            
            context.Response.ContentType = "text/plain";
            context.Response.Write("Hello World");
            
            // TODO: pull user id out of uri context & display result. 

            var addressBook = new AddressBookEntity();
            var user = (from x in addressBook.UserInfoes
                        where x.user_Id == 9
                        select x).First();
            user.isAproovedForDisplay = true;
            addressBook.SaveChanges();
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}